﻿@model IEnumerable<FortuneArterial.Site.Model.Site.PageInfo>
@{
    ViewBag.Title = "Page";
    ViewBag.SubTitle = "list";
}

<!-- row -->
<div class="row">

    <!-- col -->
    <div class="col-xs-12 col-sm-3 col-md-4 col-lg-4">
        <h1 class="page-title txt-color-blueDark">

            <!-- PAGE HEADER -->
            <i class="fa-fw fa fa-sitemap"></i>
            @ViewBag.Title
            <span>>  
				@ViewBag.SubTitle
            </span>
        </h1>
    </div>
    <!-- end col -->
    @{
        Html.RenderAction("Sparks", "Home");
    }
</div>
<!-- end row -->

<!--
	The ID "widget-grid" will start to initialize all widgets below 
	You do not need to use widgets if you dont want to. Simply remove 
	the <section></section> and you can use wells or panels instead 
	-->

<!-- widget grid -->
<section id="widget-grid" class="">

    <!-- row -->
    <div class="row">

        <!-- NEW WIDGET START -->
        <article class="col-xs-12 col-sm-12 col-md-12 col-lg-12">

            <!-- Widget ID (each widget will need unique ID)-->
            <div class="jarviswidget" id="page-list" data-widget-editbutton="false">
                <!-- widget options:
					usage: <div class="jarviswidget" id="wid-id-0" data-widget-editbutton="false">
					
					data-widget-colorbutton="false"	
					data-widget-editbutton="false"
					data-widget-togglebutton="false"
					data-widget-deletebutton="false"
					data-widget-fullscreenbutton="false"
					data-widget-custombutton="false"
					data-widget-collapsed="true" 
					data-widget-sortable="false"
					
				-->
                <header>
                    <span class="widget-icon"><i class="fa fa-list"></i></span>
                    <h2>页面列表 </h2>
                </header>

                <!-- widget div-->
                <div>

                    <!-- widget edit box -->
                    <div class="jarviswidget-editbox">
                        <!-- This area used as dropdown edit box -->
                        <!-- Normally there would be an input text box here to change widget title. 
							Use this area only if plan to let users change widget title -->
                    </div>
                    <!-- end widget edit box -->

                    <!-- widget content -->
                    <div class="widget-body no-padding">

                        <div class="no-margin fade in">
                            <a class="btn btn-default" href="/manage/page/create?parent=@ViewBag.ParentID">新增</a>
                        </div>

                        <table class="table table-bordered table-striped table-hover">
                            <colgroup>
                                <col style="width: 70px;">
                                <col style="width: 100px;">
                                <col style="width: 30px;">
                                <col />
                                <col />
                            </colgroup>
                            <thead>
                                <tr>
                                    <th>#</th>
                                    <th>ID</th>
                                    <th>Icon</th>
                                    <th>Name</th>
                                    <th>Path</th>
                                    <th>OrderNum</th>
                                </tr>
                            </thead>
                            <tbody>
                                @foreach (var item in Model)
                                {
                                    <tr>
                                        <td>
                                            <a class="btn btn-link btn-xs" href="/manage/page/edit/@item.ID"><i class="fa fa-edit"></i></a>
                                            <a class="btn btn-link btn-xs" href="#"><i class="fa fa-times"></i></a>
                                        </td>
                                        <td>@item.ID</td>
                                        <td>
                                            @if (!string.IsNullOrEmpty(item.Icon))
                                            {
                                                <i class="fa fa-lg fa-fw fa-@item.Icon"></i>
                                            }
                                        </td>
                                        <td>@item.Name</td>
                                        <td>@item.Path</td>
                                        <td>@item.OrderNum</td>
                                    </tr>
                                }
                            </tbody>
                        </table>

                    </div>
                    <!-- end widget content -->

                </div>
                <!-- end widget div -->

            </div>
            <!-- end widget -->

        </article>
        <!-- WIDGET END -->

    </div>

    <!-- end row -->

</section>
<!-- end widget grid -->

<script type="text/javascript">

    // DO NOT REMOVE : GLOBAL FUNCTIONS!
    pageSetUp();

    loadScript('/Assets/SmartAdmin/js/link4ajax.js', function() {
        link4ajax('#page-list');
    });

</script>
